import {lazy} from "react"

import Home from "./pages/Home"
import Jump from "./pages/Jump"

const load = (moduleName)=> {
  const Module = lazy(()=>import(`./pages/${moduleName}`))
  return <Module />
}

export const routes = [
  {
    path: "/",
    element: <Jump />
  },
  {
    path: "/home",
    element: <Home />,
  }
]

export const refresh = (childRoutes)=>{
  routes[1].children = childRoutes
}